var app = new Vue({
	el: '#app',
	mixins:[page,isLogin],
	data: {
		bigData: '', //数据
		searchContent: '', //搜索内容
		classArr:['招投标','新闻','企业库','人才库'],//分类数据
		classContent:'招投标',//分类内容
	},
	methods: {
		//header组件的搜索方法
		searchHeader: function(searchCtx) {
			
		},
		//获取最新动态
		getNewsList: function(currentPage) {
			var _this = this;
			var city = '';
			var buildClass = '';
			this.onePageCount = 5;
			var KeyWord = null;
			if(!this.searchContent){
				KeyWord = this.classContent;
			}else{
				KeyWord = this.classContent + ' '+$.trim(this.searchContent);
			}
			if(currentPage){
				currentPage = currentPage
			}else{
				currentPage = 1;
			}
			var method = 'BigData/FastSearch';
			var param = {
				KeyWord: KeyWord, //关键字,
				PageIndex:currentPage,
				PageSize: this.onePageCount, //提取数量
				OnlyTitle: 1, //是否索引标题(是1， 否0)
				RecordType: 1, //索引大类(1 行业资讯， 2 企业人事)
				RemoteUrl: 'http://192.168.1.91:56890', //URL地址(http: //192.168.1.91:56890)
			};
			xq.getUrl(method, param, function(res) {
				if(res.data) {
					if(!_this.totalPage){
						_this.pageArr = [];
						_this.totalPage = Math.ceil(res.data.TotalCount/_this.onePageCount);
						_this.initPage();
					}
					_this.bigData = res.data.ListEntity;
				}else{
					_this.bigData = [];
				}
			})
		},
		//获取分类
		getClass(content){
			this.totalPage = '';
			this.classContent = content;
			this.getNewsList();
		},
		//搜索按钮
		search() {
			this.totalPage = '';
			this.getNewsList();		
		},
	},
	mounted: function() {
		this.getNewsList();
		xq.confitAnimate();
	},
	updated: function() {

	}
})